{if get('uploaded')}
<div class="message_info" style="padding:8px; text-align:left;">
	{language text='Mod_Video.upload_video_done'}
	{if $bApprovalSetting}
	{language text='Mod_Video.upload_video_approval'}
	{/if}
</div>
	{if !getParam('vid_approve')}
	<ul>
		<li><a href="{url link='public.videos' id=$iUploadedId}">{language text='Mod_Video.view_your_video'}</a></li>
	</ul>
	{/if}
	<br />
	<br />
{elseif $bNoImageUploaded}
	{Video::UploadImage iId=$iUploadedId}
{else}
{literal}
<script type="text/javascript">

function check_stream(iId)
{
{/literal}
	{foreach from=$aStreamOptions item=aJava}
	var stream_{$aJava.id} = '{$aJava.image}';
	{/foreach}
	{literal}
	if ( eval('stream_'+ iId +'') == '1' )
	{
		document.getElementById('optional_image').style.display='none';
		return;
	}

	document.getElementById('optional_image').style.display='';
	return;
}
</script>
{/literal}

{$sValMess}
<form method="post" action="{url link='public.account.submit.add-video' mode='upload'}" onsubmit="{$sValJs}" enctype="multipart/form-data">
{messages}
<div id="formhide1">
<div style="padding:8px;">
<input type="hidden" name="post_item" value="true" />
<table style="width:100%;" cellspacing="2" cellpadding="4">
<tr>
    <td style="text-align:right;" class="color"><span class="star">*</span> {language text="Mod_Video.add_form_title"}:</td>
    <td class="border13">
        <input type="text" name="val[vid_title]" maxlength="40" size="40" onfocus="this.className='inputmain';" onblur="this.className='';" value="{$aVal.vid_title}" />
    </td>
</tr>
<tr>
    <td style="text-align:right;" class="color">{language text='Mod_Video.add_form_category'}:</td>
    <td class="border13">
        <select name="val[vid_list_id]" style="width:150px;">
		{foreach from=$aItems item=aItem}
		<option value="{$aItem.list_id}"{if $aVal.vid_list_id == $aItem.list_id} selected="true"{/if}>{$aItem.list_name}</option>
		{/foreach}
		</select>
    </td>
</tr>
<tr>
    <td style="text-align:right;" class="color">{language text='Mod_Video.tags'}:</td>
    <td class="border13">
        <input type="text" name="val[vid_tags]" size="30" maxlength="100" onfocus="this.className='inputmain';" onblur="this.className='';" value="{$aVal.vid_tags}" />
    </td>
</tr>
<tr>
    <td style="text-align:right;vertical-align:top;" class="color">{language text='Mod_Video.add_form_details'}:</td>
    <td class="border13">
        <textarea cols="50" rows="5" name="val[vid_info]">{$aVal.vid_info}</textarea>
    </td>
</tr>
	<tr>
    <td style="text-align:right;" class="color"><span class="star">*</span> {language text="Mod_Video.add_form_file"}:</td>
    <td class="border13">
        <input type="file" name="video" size="30" />
    </td>
</tr>
{if !$bFfmpeg}
<tr>
    <td style="text-align:right;" class="color">{language text='Mod_Video.optional_image'}:</td>
    <td class="border13">
        <input type="file" name="image" size="30" />
    </td>
</tr>
{/if}
<tr>
	<td></td>
	<td><span class="star">*</span> - {language text='Mod_Video.man_fields'}</td>
</tr>
<tr>
	<td></td>
    <td>
		<input name="act[add]" value="{language text='Mod_Video.get_video'}" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" type="submit">
	</td>
</tr>
</table>
</div>

<div class="border13">
    <div style="padding:10px;font-size:8pt;" class="color">
    <b>{language text="space_usage_info"}:</b>
    <div style="padding:8px;">
        {language text="space_used_650"}: {$iUsedSpace|filesize} <br />
        {language text="space_allowed"}: {if $iAllowedSpace == 0}{language text="unlimited"}{else}{$iAllowedSpace|filesize}{/if}
	</div>
    </div>
</div>
</div>
</form>

{include file="$sRootPath/_blocks/bar.html" sMessage='Mod_Language.upload_item'}

{/if}